﻿<%@ Page Title="Register" Language="VB" MasterPageFile="~/Master/Site.master" AutoEventWireup="false"
    CodeFile="Register.aspx.vb" Inherits="Account_Register" %>

<%@ Register Src="../Controls/Recaptcha.ascx" TagName="Recaptcha" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        #Button1
        {
            height: 23px;
        }
        .style1
        {
            color: #FFFFFF;
        }
        .style2
        {
            height: 25px;
        }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Register/Sign Up
    </h2>
    <table style="text-align: center">
        <tr>
            <td align="center" valign="top">
                <table>
                    <tr>
                        <td>
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/i/iStock__1XSmall.jpg" />
                        </td>
                    </tr>
                    <tr>
                        <td style="background-color: #3399FF">
                            <center style="height: 65px">
                                <br />
                                <span class="style1"><strong>Take a small step today to grow your business.<br />
                                    Sign Up now for a free account!</strong></span><br />
                            </center>
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                 
            </td>
            <td valign="top" align="left">
                <p>
                    <asp:CreateUserWizard ID="RegisterUser" runat="server" FinishDestinationPageUrl="~/Default.aspx"
                        LoginCreatedUser="False" ContinueDestinationPageUrl="~/Default.aspx" AnswerRequiredErrorMessage="A Security answer is required."
                        DisableCreatedUser="True" CreateUserButtonText="Sign Up">
                        <MailDefinition BodyFileName="~/Account/EmailNewRegistration.txt" Subject="New Account Registration">
                        </MailDefinition>
                        <WizardSteps>
                            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                                <ContentTemplate>
                                    <table>
                                        <tr>
                                            <td align="center" colspan="2">
                                                <strong>Sign Up Now, Get Started</strong>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="UserName" runat="server" Width="155px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                    ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="RegisterUser">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="155px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                    ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="RegisterUser">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" 
                                                    Width="155px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                                    ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
                                                    ValidationGroup="RegisterUser">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Email" runat="server" Width="155px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                                    ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="RegisterUser">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Question" runat="server" Width="155px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question"
                                                    ErrorMessage="Security question is required." ToolTip="Security question is required."
                                                    ValidationGroup="RegisterUser">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Answer" runat="server" Width="155px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
                                                    ErrorMessage="A Security answer is required." ToolTip="A Security answer is required."
                                                    ValidationGroup="RegisterUser">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:CheckBox ID="chkAgree" runat="server" Text="I have read and agree to the " /><asp:HyperLink
                                                    ID="HyperLink1" NavigateUrl="~/terms.aspx" runat="server">terms and conditions</asp:HyperLink>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:CheckBox ID="chkMailList" runat="server" Text="It is ok to send me mail occasionally" />
                                            </td>
                                        </tr>
                                        <!--<tr>
                                            <td colspan="2">
                                                <uc1:Recaptcha ID="Recaptcha1" runat="server" />
                                            </td>
                                        </tr>-->
                                        <tr>
                                            <td align="center" colspan="2">
                                                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                                    ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                                    ValidationGroup="RegisterUser"></asp:CompareValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2" style="color: Red;" class="style2">
                                                <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                                                <asp:Label ID="lblAgreed" runat="server" Text=""></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:CreateUserWizardStep>
                            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                                <ContentTemplate>
                                    <table>
                                        <tr>
                                            <td align="center">
                                                 
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                 
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CommandName="Continue"
                                                    Text="Continue" ValidationGroup="RegisterUser" Style="display: none;" />
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:CompleteWizardStep>
                        </WizardSteps>
                        <FinishNavigationTemplate>
                            <asp:Button ID="FinishPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious"
                                Text="Previous" />
                            <asp:Button ID="FinishButton" runat="server" CommandName="MoveComplete" Text="Finish" />
                        </FinishNavigationTemplate>
                    </asp:CreateUserWizard>
                    <asp:Label ID="lblResult" runat="server" Text=""></asp:Label>
                    <uc1:Recaptcha ID="Recaptcha1" runat="server" />
            </td>
        </tr>
    </table>
    <asp:Panel ID="pnlRegistrationSuccess" runat="server" Style="display: none" CssClass="modalPopup">
        <%--                <input id="btnCancel" type="button" value="X" style="float: right; background-color: #FF0000;" />
        --%>
        <asp:Button ID="btnCancel" runat="server" Text="X" Style="float: right; background-color: #FF0000;" />
        <h2>
            Account Registration Successful
        </h2>
        <p>
            Your Account has been registered successfully.
            <br />
            Please check your registered mailbox for an email in which, for security purposes,
            you must first confirm your email address.
            <br />
            You need to click the link in that email before your account can be used.
            Please close this box to proceed.
        </p>
    </asp:Panel>
    <asp:Button ID="btnRegistrationSuccess" runat="server" Text="Button" Style="display: none;" />
    <asp:ModalPopupExtender ID="RegistrationSuccessPopupExtender" runat="server" PopupControlID="pnlRegistrationSuccess"
        DynamicServicePath="" Enabled="True" TargetControlID="btnRegistrationSuccess"
        BackgroundCssClass="modalBackground" DropShadow="true">
    </asp:ModalPopupExtender>
        <asp:Panel ID="pnlAccRegistrationSuccess" runat="server" Style="display: none" CssClass="modalPopup" >
        <%--                <input id="btnCancel" type="button" value="X" style="float: right; background-color: #FF0000;" />
        --%>
        <asp:Button ID="btnAccRegistrationSuccessClose" runat="server" Text="X" Style="float: right; background-color: #FF0000;" />
        <h2>
            Registration Successful
        </h2>
        <p>Welcome!
            Thank you for registering with us. 
            <br />
            
            Your account has been linked to that of the individual (“Your sponsor”) that 
            requested a login for you. 
            <br />
            You will be able to use the site as long as "your Sponsor’s" account remains 
            active.
            You will also be able to communicate with "your Sponsor’s" customers.
            Please close this box to proceed.
            </p>

    </asp:Panel>
    <asp:Button ID="btnAccRegistrationSuccess" runat="server" Text="Button" Style="display: none;" />
    <asp:ModalPopupExtender ID="AccRegistrationSuccessModalPopupExtender" runat="server" PopupControlID="pnlAccRegistrationSuccess"
        DynamicServicePath="" Enabled="True" TargetControlID="btnAccRegistrationSuccess"
        BackgroundCssClass="modalBackground" DropShadow="true">
    </asp:ModalPopupExtender>
    <asp:Panel ID="pnlRegisterError" runat="server" Style="display: none" CssClass="modalPopup">
        <input id="btnCancelRegisterError" type="button" value="X" style="float: right; background-color: #FF0000;" />
        <h2>
            Register Error</h2>
        <p>
            Sorry! Your Account has not been created successfully.
            <br />
            If you need help feel free to contact us using the Contact Us Page.
            Please close this box to proceed.
            <br />
        </p>
    </asp:Panel>
    <asp:Button ID="btnRegisterError" runat="server" Text="Button" Style="display: none;" />
    <asp:ModalPopupExtender ID="RegisterErrorModalPopupExtender" runat="server" PopupControlID="pnlRegisterError"
        DynamicServicePath="" Enabled="True" TargetControlID="btnRegisterError" BackgroundCssClass="modalBackground"
        DropShadow="true" CancelControlID="btnCancelRegisterError">
    </asp:ModalPopupExtender>
    <asp:Panel ID="pnlInvitationFail" runat="server" Style="display: none" CssClass="modalPopup">
        <asp:Button id="btnCancelInvitationFail" runat="server" Text="X" style="float: right; background-color: #FF0000;" />
        <h2>
            Invitation Error</h2>
        <p>
            <asp:Label ID="lblInvitationMessage" runat="server" Text=""></asp:Label>.
            <br />
            If you need help feel free to contact us using the Contact Us Page.
            Please close this box to proceed.
            <br />
        </p>
    </asp:Panel>
    <asp:Button ID="btnInvitationFail" runat="server" Text="Button" Style="display: none;" />
    <asp:ModalPopupExtender ID="InvitationFailModalPopupExtender" runat="server" PopupControlID="pnlInvitationFail"
        DynamicServicePath="" Enabled="True" TargetControlID="btnInvitationFail" BackgroundCssClass="modalBackground"
        DropShadow="true" >
    </asp:ModalPopupExtender>
</asp:Content>
